package xrc.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 公共返回对象枚举
 */
@Getter
@ToString
@AllArgsConstructor
public enum RespBeanEnum {

    // 通用
    SUCCESS(200, "SUCCESS"),
    ERROR(500,"服务端异常"),

    // 登录模块
    LOGIN_ERROR(500210,"用户名或密码错误"),
    MOBILE_ERROR(500211,"手机号码格式不正确"),
    BIND_ERROR(500212,"参数校验异常"),
    MOBILE_NOT_EXIST(500213,"手机号不存在"),
    DELETE_ERROR(500214,"删除失败"),
    SESSION_ERROR(500215,"用户不存在"),
    REQUEST_ILLEGAL(500216,"请求非法，请重新尝试"),

    // 秒杀模块
    EMPTY_STOCK(500500,"库存不足"),
    REPEAT_ERROR(500501,"该商品每人限购一件"),
    CAPTCHA_ERROR(500502,"验证码错误"),
    ACCESS_LIMIT_REACTED(500503,"访问过于频繁，请稍后再试"),
    // 订单模块
    ORDER_NOT_EXIST(500300,"订单不存在")
    ;

    // 状态码
    private final Integer code;
    // 信息
    private final String message;
}
